package wang.spring.cloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import wang.spring.cloud.teacher.ServiceFeign;

@RestController
@RequestMapping("/client")
public class ClientController {

    @Autowired
    private ServiceFeign serviceFeign;

    @GetMapping("/get")
    public String get(){
        String service = serviceFeign.get();
        System.out.println(service);
        return "I'm a client";
    }
}
